/**
 * base64 转换为 url，节约sessionStorage空间
 */
export function base64toURL(base64) {
    return new Promise(resolve => {
        if (window.fetch && URL.createObjectURL) {
            window
                .fetch(base64)
                .then(res => res.blob())
                .then(blob => URL.createObjectURL(blob))
                .then(url => {
                    resolve(url);
                });
        } else {
            resolve(base64);
        }
    });
}
